<?php

namespace app\common\validate;

use think\Validate;

class UserValidate extends BaseValidate
{
    /**
     * 验证规则
     */
    protected $rule = [
        'real_name|真实姓名' => 'require|length:2,50',
        'gender|性别' => 'require|in:0,1',
        'birthday|出生年月' => 'require|date',
        'province|省' => 'require|integer',
        'city|市' => 'require|integer',
        'area|区' => 'require|integer',
        'nation|民族' => 'require|length:1, 50',
        'school|学校' => 'require|length:1, 50',
        'duty|职务' => 'require|length:1, 50',
        'grade|年纪' => 'require|length:1, 50',
        'mobile|联系方式' => 'require|isMobile'
    ];
    /**
     * 提示消息
     */
    protected $message = [
    ];
    /**
     * 验证场景
     */
    protected $scene = [
        'add'  => [],
        'edit' => [],
    ];
    
}
